//
//  InviteFriendViewController.h
//  Gruphoto
//
//  Created by Thao Nguyen Huy on 1/8/13.
//  Copyright (c) 2013 CNC Software. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <MessageUI/MessageUI.h>

typedef enum {
    InviteViaSMS,
    InviteViaEmail
}InviteType;

@class Event;

@interface InviteFriendViewController : UIViewController <UITableViewDataSource, UITableViewDelegate, UISearchBarDelegate, MFMailComposeViewControllerDelegate, MFMessageComposeViewControllerDelegate> {
    UISearchBar *friendSearchBar;
    UITableView *friendTableView;
    InviteType inviteType;
    
    NSMutableArray *contactsHaveEmail;
    NSMutableArray *contactsHavePhone;
    NSMutableArray *contactsNeedDisplay;
    NSString *code;
    BOOL isPrivate;
}
@property (nonatomic, retain) IBOutlet UISearchBar *friendSearchBar;
@property (nonatomic, retain) IBOutlet UITableView *friendTableView;
@property (nonatomic, retain) IBOutletCollection(UIButton) NSArray *inviteTypeButtons;

@property (nonatomic, retain) NSMutableArray *contactsHaveEmail;
@property (nonatomic, retain) NSMutableArray *contactsHavePhone;
@property (nonatomic, retain) NSMutableArray *contactsNeedDisplay;
@property (nonatomic, retain) NSString *code;
@property (nonatomic, assign) BOOL isPrivate;

- (IBAction)cancelButtonPressed:(id)sender;
- (IBAction)doneButtonPressed:(id)sender;
- (IBAction)inviteTypeButtonPressed:(id)sender;
- (IBAction)inviteFriendButtonPressed:(id)sender;

// for searching
- (void)resetSearch;
- (void)handleSearchForTerm:(NSString *)searchTerm;

@end
